Address warnings in testing about entities-intro.svg #688
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Right now in testing, whenever
DatasetIntroduction
is rendered, the following warning is shown:For example, that warning is shown after navigating to the datasets page.
Karma doesn't automatically serve our assets, which is why there's a 404. In the past, we've solved this by having Karma serve the asset, then proxying from the location where Frontend expects to find the asset to the location where Karma serves it. I've done something similar here.
There is one way in which the strategy here is different from what we've done in the past. I think we're having webpack process entities-intro.svg, resulting in the hash in the filename and the location of the image at /img rather than /images. I don't think we have webpack process our other assets in the same way. When the icon files change, for example, we manage our own cache-busting in icomoon.css using a query parameter. It's because the webpack-processed image has a hash in its filename that I've included that hash in the Karma
proxies
option.I think that's OK, because the image isn't likely to change, so its hash also isn't likely to change. We're also going to try to move away from webpack at some point (#671), so I think we probably don't need to dig too deeply into this. We could maybe also stop having webpack process the image, though I think it's OK that we do. For now, I mostly just wanted to remove these warnings in testing.